Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O3-1157: Added field to search and select patient identifiers from implementer tools #380

Merged
merged 4 commits into from
Apr 8, 2022
Merged

O3-1157: Added field to search and select patient identifiers from implementer tools #380

merged 4 commits into from
Apr 8, 2022

Conversation

vasharma05
Copy link
Member

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.

For changes to apps

If applicable

  • My work includes tests or is validated by existing tests.
  • I have updated the esm-framework mock to reflect any API changes I have made.

Summary

I have added a search field for searching and selecting a patient-identifier-type's UUID, similar to searching a concept UUID/ person-attribute-type UUID. Along with that, I've added the UUID validator for the field.

image

Screenshots

Related Issue

https://issues.openmrs.org/browse/O3-1157

Other

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2022

File size impact

Merging O3-1157-configurable-identifiers into master impact files as follow:

@openmrs/esm-devtools-app (+0.04%)
Files new size
packages/apps/esm-devtools-app/dist/217.js 423 kB (+168 B / +0.04%) ↗️
Unmodified (4) 25.2 kB (0 B / +0%) 👻
Total (5) 448 kB (+168 B / +0.04%) ↗️
@openmrs/esm-implementer-tools-app (+0.48%)
Files new size
packages/apps/esm-implementer-tools-app/dist/268.js 218 kB 👶
packages/apps/esm-implementer-tools-app/dist/769.js 33.6 kB 👶
packages/apps/esm-implementer-tools-app/dist/217.js 423 kB (+168 B / +0.04%) ↗️
packages/apps/esm-implementer-tools-app/dist/707.js deleted (-23.9 kB)
packages/apps/esm-implementer-tools-app/dist/371.js deleted (-216 kB)
packages/apps/esm-implementer-tools-app/dist/683.js 10.3 kB (0 B / +0%) 👻
packages/apps/esm-implementer-tools-app/dist/openmrs-esm-implementer-tools-app.js 10.7 kB (0 B / +0%) 👻
Unmodified (16) 1.68 MB (0 B / +0%) 👻
Total (23) 2.37 MB (+11.3 kB / +0.48%) ↗️
@openmrs/esm-login-app (+0.01%)
Files new size
packages/apps/esm-login-app/dist/217.js 423 kB (+168 B / +0.04%) ↗️
Unmodified (27) 1.62 MB (0 B / +0%) 👻
Total (28) 2.04 MB (+168 B / +0.01%) ↗️
@openmrs/esm-offline-tools-app (+0.01%)
Files new size
packages/apps/esm-offline-tools-app/dist/217.js 423 kB (+168 B / +0.04%) ↗️
Unmodified (25) 2.37 MB (0 B / +0%) 👻
Total (26) 2.79 MB (+168 B / +0.01%) ↗️
@openmrs/esm-primary-navigation-app (+0.01%)
Files new size
packages/apps/esm-primary-navigation-app/dist/217.js 423 kB (+168 B / +0.04%) ↗️
Unmodified (17) 1.78 MB (0 B / +0%) 👻
Total (18) 2.2 MB (+168 B / +0.01%) ↗️
@openmrs/esm-app-shell (+0.01%)
Files new size
packages/shell/esm-app-shell/dist/service-worker.js 164 kB (+101 B / +0.06%) ↗️
packages/shell/esm-app-shell/dist/openmrs.js 1.41 MB (+84 B / +0.01%) ↗️
Unmodified (2) 537 kB (0 B / +0%) 👻
Total (4) 2.11 MB (+185 B / +0.01%) ↗️
Generated by @jsenv/file-size-impact during Report bundle size#2090574679 on af864ca

@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2022

File size impact

Merging O3-1157-configurable-identifiers into master impact files as follow:

@openmrs/esm-devtools-app (+0.04%)
Files new size
packages/apps/esm-devtools-app/dist/217.js 423 kB (+168 B / +0.04%) ↗️
Unmodified (4) 25.2 kB (0 B / +0%) 👻
Total (5) 448 kB (+168 B / +0.04%) ↗️
@openmrs/esm-implementer-tools-app (+0.48%)
Files new size
packages/apps/esm-implementer-tools-app/dist/268.js 218 kB 👶
packages/apps/esm-implementer-tools-app/dist/769.js 33.6 kB 👶
packages/apps/esm-implementer-tools-app/dist/217.js 423 kB (+168 B / +0.04%) ↗️
packages/apps/esm-implementer-tools-app/dist/707.js deleted (-23.9 kB)
packages/apps/esm-implementer-tools-app/dist/371.js deleted (-216 kB)
packages/apps/esm-implementer-tools-app/dist/683.js 10.3 kB (0 B / +0%) 👻
packages/apps/esm-implementer-tools-app/dist/openmrs-esm-implementer-tools-app.js 10.7 kB (0 B / +0%) 👻
Unmodified (16) 1.68 MB (0 B / +0%) 👻
Total (23) 2.37 MB (+11.3 kB / +0.48%) ↗️
@openmrs/esm-login-app (+0.01%)
Files new size
packages/apps/esm-login-app/dist/217.js 423 kB (+168 B / +0.04%) ↗️
Unmodified (27) 1.62 MB (0 B / +0%) 👻
Total (28) 2.04 MB (+168 B / +0.01%) ↗️
@openmrs/esm-offline-tools-app (+0.01%)
Files new size
packages/apps/esm-offline-tools-app/dist/217.js 423 kB (+168 B / +0.04%) ↗️
Unmodified (25) 2.37 MB (0 B / +0%) 👻
Total (26) 2.79 MB (+168 B / +0.01%) ↗️
@openmrs/esm-primary-navigation-app (+0.01%)
Files new size
packages/apps/esm-primary-navigation-app/dist/217.js 423 kB (+168 B / +0.04%) ↗️
Unmodified (17) 1.78 MB (0 B / +0%) 👻
Total (18) 2.2 MB (+168 B / +0.01%) ↗️
@openmrs/esm-app-shell (+0.01%)
Files new size
packages/shell/esm-app-shell/dist/service-worker.js 164 kB (+101 B / +0.06%) ↗️
packages/shell/esm-app-shell/dist/openmrs.js 1.41 MB (+84 B / +0.01%) ↗️
Unmodified (2) 537 kB (0 B / +0%) 👻
Total (4) 2.11 MB (+185 B / +0.01%) ↗️
Generated by @jsenv/file-size-impact during Report bundle size#2090653948 on 73586ad


const filteredResults: Array<PatientIdentifierType> | undefined =
useMemo(() => {
if (!isLoading && searchTerm && searchTerm !== "") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"" is considered false, so searchTerm and searchTerm !== "" is redundant

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, thanks, I'll just update it.

@@ -0,0 +1,107 @@
import React, { useState, useMemo } from "react";
import uniqueId from "lodash-es/uniqueId";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the UUID library that we use site-wide?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is just for generating a unique id for the Input field.
The site-wide application is UUID version 4, afaik.

@vasharma05 vasharma05 merged commit 35158c4 into openmrs:master Apr 8, 2022
@ZacButko ZacButko mentioned this pull request May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants